1. Field of the Invention
The present invention relates to a process control method and an image forming apparatus capable of increasing a freedom degree of processing.
2. Discussion of the Background Art
Recently, an image forming apparatus, such as a multifunctional machine, etc., including various functions, such as a copier, a facsimile, a printer, a scanner, etc., has technically advanced. Such a multifunctional machine has been almost always formed by combining various components, such as a copier, a facsimile, a printer, a scanner, etc. However, each of the various components is expected to have a sophisticated function and to be merged and used. Further, in accordance with a recent advance in networking, an affinity with networking becomes increasingly important.
However, there is conventionally a practical limit to merge each of the functions. However, since a future multifunctional machine requires combination of various sophisticated components, software for controlling thereof also becomes sophisticated and complex, accordingly.
In accordance with such complexity of the software, an OS (Operating System) for controlling the software comes to lack functions if only including a multitask monitor, and is needed to include a memory protection function using a virtual memory, and a controlling function for controlling an execution authority based on a user mode or a kernel mode in view of system stability and development efficiency. To meet such needs, a UNIX (TM) or a UNIX compatible OS recently comes to be used as an OS for control software even in a built-in instrument, such as a multifunctional machine, etc.
Such an OS becomes rich in protection functions. For example, an independent virtual space is assigned to all of processes, and another process or a kernel region is inhibited to be accessed. Further, a user process is controlled to operate in a user mode of a CPU, and a privilege instruction is inhibited to execute, and accessing to a region is restricted except for accessing in a kernel mode. Further, it is common in the UNIX (TM) type OS that a function is extended in view of increasing a security.
Even though, the UNIX (TM) type OS are excellent due to various substantial protection functions, they cause the following problems when such an OS is used in a built-in instrument, such as an image forming apparatus, etc.
The first problem relates to a memory access. This is caused because memory access is restricted in a user mode, and thus addresses cannot be freely accessed. In general, this function is advantageous, but is deficiency when implemented in a built-in instrument. For example, there is a demand to access to a font ROM of a printer and a data region of an I/O apparatus in order to readily confirm a performance of software in a developing step thereof. However, since the accessing needs passage through a special device driver, creation and installation of the special device driver are needed in a system, thereby causing difficulty. However, it is too much to entirely freely allow accessing to a memory in view of security, and there is a demand to enable such free access upon need.
The second problem relates to continuous execution. This is caused because an interruption inhibiting condition cannot be designated by freely handling an interruption mask located in a status register of a CPU. Specifically, execution of a user mode can be interrupted by a hardware in a user process. However, it can be restriction when usage of built-in instrument is guaranteed to be continuous. For example, when a firmware stored in a ROM arranged in an instrument is remotely updated via a network, continuous execution is needed to avoid a malfunction, which is caused when a current processing is moved to the other process. However, it is not easy because external hardware interruption cannot be inhibited. In such a situation, separate provision of a system call that inhibits interruption can be one of solutions. However, an overhead of the system call is too large to use when frequently switching between interruption inhibition and permission as a problem.
The third relates to a cache handling problem. This is caused because an instruction to invalidate a cache in order to increase a writing speed into a memory region is a privilege instruction that is unusable directly from the user process. For example, when copying and clearing a large memory region during depiction processing of a printer or the like, a processing speed is increased by causing cache contents of a writing destination to be “invalid” using a “cache” instruction. However, since the “cache” instruction is a privilege instruction, the user process cannot execute it, and a “write allocate” processing (i.e., processing executed when memory contents are read into a cache in a cache line unit), executed when an ordinal cache is effective, is unexpectedly executed. As a result, new data is needlessly read during copying and clearing, thereby decreasing a speed.
It can resolve such problems that a system call is added to either copy or clear a large region. However, since context switching does not occur unless “tsleep ( )” is voluntarily called and the context switching is executed during execution of the system call, the context switching is impossible during when copying and clearing processing, which takes a long time period, are executed. If a process having a highly urgent level becomes to be executable, context switching to this process is not performed as a problem.